package com.Design.Visitor.old;

import java.util.ArrayList;

/**
 * @Author Lc
 * @Date 2023/9/30
 * @PackageName: com.Design.Visitor
 * @ClassName: MainGo
 * @Description:
 */

public class MainGo {
    public static void main(String[] args) {
        ArrayList<Person> people = new ArrayList<>();
        Man man = new Man();
        man.setAction("成功");
        people.add(man);

        WoMan woMan = new WoMan();
        woMan.setAction("成功");
        people.add(woMan);

        people.forEach(Person::getConclusion);
    }
}
